Insights into countries’ exposure and vulnerability to food trade shocks from network-based simulations

In the context of a global food system, the dynamics associated to international food trade have become key determinants of food security. In this paper, we resort to a diffusion model to simulate how shocks to domestic food production propagate through the international food trade network and study the relationship between trade openness and vulnerability. The results of our simulations suggest that low-income and food insecure countries tend to be the more exposed to external shocks and, at the same time, they are usually not in a position to take full advantage of international food trade when it comes to shield themselves from shocks to domestic production. We also study and discuss how nodes characteristics are associated with the propagation dynamics and with countries’ vulnerability, finding that simple centrality measures can significantly predict the magnitude of the shock experienced by individual countries.

Insights into countries' exposure and vulnerability to food trade shocks from network-based simulations Marco Grassia 1,6 , Giuseppe Mangioni 1,6* , Stefano Schiavo 2,3,4,6 & Silvio Traverso 5,6 In the context of a global food system, the dynamics associated to international food trade have become key determinants of food security. In this paper, we resort to a diffusion model to simulate how shocks to domestic food production propagate through the international food trade network and study the relationship between trade openness and vulnerability. The results of our simulations suggest that low-income and food insecure countries tend to be the more exposed to external shocks and, at the same time, they are usually not in a position to take full advantage of international food trade when it comes to shield themselves from shocks to domestic production. We also study and discuss how nodes characteristics are associated with the propagation dynamics and with countries' vulnerability, finding that simple centrality measures can significantly predict the magnitude of the shock experienced by individual countries.
Despite the substantial progress achieved over the last 30 years, food insecurity still affects about two billion people worldwide and the prevalence of undernourishment has been slowly on the rise since 2014. According to FAO and other international agencies, this alarming trend is likely due to a mix of factors, but mainly driven by the interaction between a surge in the number of conflicts and increasing climate-related shocks 1,2 .
With around one-quarter of agricultural production moving across international borders 3 and the emergence of a truly global food system 4 , international trade has become a key determinant of food security and plays a crucial role in the transmission of shocks, both natural and man-made 5,6 . On the one hand, international flows allow countries to decouple food consumption from local production, to exploit their comparative advantages and to make a more efficient use of their natural resource endowment 3,[7][8][9][10][11] . In addition, food trade can contribute to the mitigation of the risks associated with idiosyncratic shocks to domestic food supply [12][13][14][15][16] . On the other hand, interconnected markets can facilitate the transmission of shocks and their diffusion, thus increasing the vulnerability of countries to disruptions originating from abroad [17][18][19] . The role of trade is particularly sensitive when it comes to agricultural goods, as there is a long-standing debate on the merits of international integration versus some degree of 'food sovereignity' [20][21][22][23] , and export restrictions are a common, albeit often ineffective, tool to address shocks to domestic supply 24 .
In this paper, we use a network model of shock diffusion to investigate this double role of trade in mitigating vs. propagating local shocks to agricultural production. In particular, we use data on bilateral trade flows to build the international food trade network and then run a series of simulations to explore how the characteristics of individual countries as well as the topology of the network are associated with the spreading dynamics. More precisely, by simulating a series of shocks to domestic and foreign food production, we study whether and to what extent a country's position in the food trade network can predict its exposure to external shocks as well as its ability to mitigate the effects of a fall in domestic food production by sharing the burden with the other countries in the network. Finally, we identify the level of reserves capable of guaranteeing an adequate level protection from most of the shocks we simulated.
As climate change increases the likelihood of extreme weather events that can adversely affect agricultural production 5,25 , understanding the role of international trade as a mitigating factor or, on the contrary, as a

Results
Exposure to food trade shocks. In order to assess countries' exposure to food trade shocks we simulate a 30% drop in domestic food production for each country at a time, and study how the shock propagates through the network. At the end of each simulation, some countries in the network (one, at least) will register a demand deficit, that we measure in terms of daily calories per capita (kcals/person/day). Hence, by calculating the average deficit across all the simulations, we obtain an indicator of countries' overall exposure to food trade shocks.
As shown in Fig. 1, for most of the countries in the network, the expected demand deficit associated to an idiosyncratic shock hitting a random node is close to zero or below 10 kilocalories per person per day. It is also apparent, however, that most of the exposed countries are concentrated in Africa, in the Middle East, in East Asia and in Latin America and the Caribbean. The highest demand deficits are concentrated among a small number of countries-many of which heavily rely on food import and are characterized by low level of income and food security-that struggle to pass on the shock to their trade partners.
To illustrate the diffusion process with a specific example, Fig. 2 presents the case of a 30% decline in US food production. In the first step of the simulation (left panel), the shock is transmitted only to direct trade partners, which are mostly in Asia and in the Americas. After that, however, the shock reaches also countries that do not directly trade with the spreader and, by the end of the simulation (i.e., when no country can further cut its exports in order to reduce its demand deficit), the burden has partially shifted towards (mostly poor) food-importers in Africa and Asia (right panel of Fig. 2). For example, Canada and Germany are able to pass the shock on to their trade partners and do not experience demand deficits, while countries such as Algeria, Angola, Mauritania and Mozambique, despite not directly importing food from the US, end up absorbing a significant portion of the shock. Interestingly, because of the complex diffusion dynamics, at the end of the simulation part of the shock returns to (and it is absorbed by) the spreader.
Networks shown in the lower panel in Fig. 2 can also help in visualizing the effect of the shock originated in the United States. What emerges is a significant reduction in the number and the strength of bilateral links by the end of the simulation. This translates into a number of isolated nodes, corresponding to food-importers that are mostly located in Africa and Asia. Such a modification of the network is also evident by looking at the node degree and strength distributions, reported in Fig. 5. It is interesting to note that, while the degree distribution is heavily modified, only minor changes can be observed in the strength distribution. From a modeling point of view, this result stems from Eqs. (8) and (9) of our shock propagation model. In fact, they express that the fraction of demand deficit absorbed by an importer-country is inversely proportional to its GDP. The impact of this policy is particularly strong on countries with low GDP and weak links that become rapidly isolated. In other words, small and poor countries that import a lot of food while exporting little bear the brunt of any shocks since www.nature.com/scientificreports/ they will be heavily affected by export reductions imposed by their partners while at the same time not being able to transfer a relevant share of the shock to other countries. When countries that are already peripheral to the world trade system are hit, reductions in trade flows can result in link removal, with a number of countries becoming isolated. Because links that are removed are typically weak to start with, the impact on the strength distribution is more limited compared to the degree distribution. Qualitatively similar patterns are observed across all countries, with node-specific features such as the position within the network and the amount of food export determining a country's ability to pass on the shock to trade partners and third countries.
Hedging against domestic shocks. When a country is integrated into international food markets, it is exposed to the risks of external shocks. At the same time, however, international trade ensures that it can rely on food import to compensate unexpected declines in its domestic production. In other words, food trade can hedge countries against the risk of idiosyncratic shocks to agricultural output that may happen, for example, in the wake of adverse weather conditions or natural disasters. Not all the countries, however, have the same capacity to take advantage of international trade. Indeed, as shown in Fig. 3, while some countries are able to shift a large share of their domestic shocks to the rest of the network, others struggle to do so. On the one hand, most European countries, together with those in North America and in the Pacific region, are able to resort to trade to deflect shocks without serious consequences on domestic food availability. For example, even in the case of a 30% fall in domestic production, the US would manage to shift more than 90% of the burden on the rest of the network, ending up absorbing only a small fraction of the original shock (see also Fig. 2). On the other hand, according to our simulations, several other countries are not able to take full advantage of the trade channel to ease the pressure of a fall in domestic food supply, ending up with a large reduction in the amount of available calories. As in the case of exposure to external shocks, these countries are concentrated in Africa, in the Middle East and in the continental part of South-East Asia, that are the regions where most of the food insecure households live. Indeed, most of these countries barely manage to share 25% of the burden of the food crisis with the rest of the network.
Food shocks and emergency reserves. The adverse effects of food shocks can be greatly mitigated when countries can rely on emergency food reserves. Indeed, adequate buffer stocks can smooth out unexpected reductions in food supply. Our simulations allow to identify the amount of reserves to stock to insure against most of the shocks. To do so, for each country we take the 95th percentile of the demand deficits stemming from the entire set of simulations across the different values of α ∈ (0, 0.5, 1) , and use it as a measure of the reserve stocks needed to fend off all but the most severe outcomes of the simulations. Table 1 reports a list of the 40 countries (with a population of at least one million) with the highest demand deficits (in terms of kcal/person/day) corresponding to the 95th percentile of the simulations. Similarly to what has emerged from Figs. 1 and 3, poor countries are more likely to endure the most severe deficits. Moreover there is some geographic clustering in the results: out of the 40 countries included in Table 1  Exposure to external shocks: average demand deficit. The map reports the final demand deficit (in terms of kcals/person/day) averaged over a series of N simulations that reproduce, one at the time and for all the countries in the network, the propagation of shock associated to a 30% drop of domestic food production. The diffusion of the shock is simulated setting α = 1 , but similar results can be obtained imposing α = 0.5 and α = 0 . The map is generated by using GeoPandas 37 with Natural Earth data v4.1. www.nature.com/scientificreports/ The simulations suggest that, in order to able to deal with 95% of the shocks, the countries listed in Table 1 need to stock substantial amount of food reserves. For example, a country like Cyprus should store an amount of food equivalent to about thousand kilocalories per person per day, corresponding to about one fourth of the country's domestic food supply. While most of the countries on the top the list are relatively small, the list also includes a number of large countries such as Vietnam, Congo and Iraq. On the one hand, this problem could be best addressed by constituting international emergency funds to help the countries facing the worst shocks. On , how a simulated shock associated to a 30% reduction in US domestic food production propagates to the other countries of the network. In particular, the left panel reports the countries affected in the first step of the simulation, while the right panel reports the final distribution of the shock (i.e., at the end of the simulation). The diffusion of the shock is simulated setting α = 1 , but similar results can be obtained imposing α = 0.5 and α = 0 . Below the chord diagrams, the corresponding networks are shown. The color of the nodes represents the Country's continent, and the mapping is the same as in the chords diagrams. The node marked by a square represents the US.   www.nature.com/scientificreports/ the other hand, coordination problems are often exacerbated in times of crisis and even if pooling food reserves represents the first best solution, it might be difficult to achieve in practice 38 .

Regression analysis.
To get a better sense of the relationship between a country's position in the network and the outcome of the simulations, we run a series of regressions where the dependent variable is the demand deficit (kcals/person/day) faced by each country j when a shock hits country i. Considering the large number of zeros in the outcome variable, we employ Tobit regression instead of standard OLS. A detailed description of the econometric methodology is presented in "Methods" section. Explanatory variables include per capita GDP, absolute shock size, the concentration of import flows, indicators for whether the shock is domestic, or it originates in a partner country, and standard network measures for both countries (the one hit by the original shock and the one for which we measure the demand deficit).
The main results are summarized in Fig. 4, where we compare three different econometric specifications based on the inclusion of alternative centrality measures. Details of the regression results, including explanatory variables with non-significant coefficients, are presented in Table 5 in "Methods" section.
Predictably, larger shocks tend to be associated with larger demand deficits. When the shock is domestic, a country will-everything else equal-bear a larger fraction of it and thus experience a larger caloric deficit. On the other hand, when the shock originates abroad, we have two indicator variables, one denoting an indirect connection between the origin of the shock and the one experiencing a demand deficit (that is, distance(i, j) ≥ 2 ), and the second taking value 1 if there is no direct path linking i to j. A shock hitting a non-direct partner has, on average, a lower effect on any country. However, the small a barely significant coefficient suggests that in a highly connected system, the difference is minimal and shocks reverberate globally.
The concentration of imports (share coming from the four most important partners, C4), has a negative effect, suggesting that relying on a small number of key suppliers shields countries from external shocks and diversification seems to have little beneficial effects in our simulations.
When shocks originate in a country with a large number of outward links, it has multiple channels to propagate through. As a result, other countries end up with larger demand deficits. On the contrary, many inward links imply that a higher proportion of the shock remains in the originating country.
Of course, the number of import partners is a crude measure of exposure to external shocks, because not all trade flows are equally important. When looking at the total magnitude of kcals that are either imported or exported by countries, we observe that a larger amount of imports is associated with a larger demand deficit, and the same holds when a shock originates from a country that exports a lot. On the other hand, this feature does not play a significant role in shielding countries from the negative effects of a shock (although the estimated coefficient for the out-strength of destination countries takes a negative sign, it is not significant at 5% and thus not reported in Fig. 4).
A high level of clustering is associated, on average, with lower demand deficits. One way to rationalize this result is that when a shock reaches a cluster, there are multiple channels that allow countries to dissipate it;   Table 5 of "Methods" section). www.nature.com/scientificreports/ moreover, it is less likely to disproportionately affect a single partner since there are strong interconnections within the cluster. We experiment with different measures of network centrality, namely betweenness, hub score, and PageRank. We do not have a strong prior on the effect of centrality: while shocks originating in more central nodes will probably affect a larger number of countries, the very fact that they travel further implies there is more room to dissipate and have smaller effects on single nodes. On the other hand, more central countries are more likely to be hit by external shocks, but should also have the ability to pass them on to more partners. We find no significant correlation between any of the centrality measures and the size of the final demand deficit in countries receiving the shock. On the contrary, the position of origin countries in the network does play a role. Hub score and, to a lesser extent, PageRank centrality are negatively correlated with final deficits, whereas the correlation is positive when we look at betweenness centrality. Hubs, which export to several countries, thus appear to distribute the shock across multiple partners and this reduces the toll imposed on each one of them. On the other hand, high betweenness may signal the ability of a country to connect different parts of the network, but not necessarily through many links; as a result, when a shock originates in a central country it may travel to distant countries yet generate, everything else equal, important consequences on trade partners.
The coefficients for origin country's hub centrality and out-strength have opposite sign in the regression, which may seem counter-intuitive. Yet, the coefficient on hub centrality turns negative only when origin outstrength is included in the regression, while taking a positive value otherwise. A possible interpretation is that while out-strength captures the overall 'fire power' of a node, and so its ability to diffuse/transmit the shock, hub centrality also depends on the identity of network partners (in the present context, hubs are countries that export a lot to big importers). If large importers somehow limit the transmission of shocks (because they export less and so have less room to reduce their sales abroad), then shocks hitting hubs will travel a smaller distance in the network. We also note that this result is driven by a few countries with very high centrality (both in terms of hub and out-strength): if we drop observations in the top 10% of hub centrality, the associated coefficient turns positive (yet not significant).

Vulnerability analysis.
In this part of the analysis we concentrate on the vulnerability of countries to external shocks, by taking the vantage points of 'destination countries' and pooling across all the simulations. We follow two complementary approaches: first we look at the number of times a country experiences a caloric deficit above a critical threshold; then, we analyze the ranking of each country in terms of demand deficit.
Demand deficit above a critical threshold. We have defined two threshold levels for the final demand deficit in each country, equal to either 250 or 500 daily kcals per capita: these represent 1/8 or 1/4 of the recommended daily intake for an adult. We count how many times a given country faces a demand deficit greater or equal to the threshold across all the simulations we run, and use the value as the dependent variable capturing the vulnerability of countries. In choosing the threshold we have to balance the severity of the nutritional deficit against the need to have enough observations for which the dependent variable is nonzero. Because the dependent variable is a count, we cannot use standard OLS but rather revert to a negative binomial regression. Table 2 displays results for the two thresholds. Estimated coefficients are similar both qualitatively and quantitatively, suggesting that the value of the threshold is not crucial to the results.
Per capita GDP is positively correlated with our measure of vulnerability: while counter-intuitive at first, this result is driven by the fact that richer countries are more heavily embedded in international trade and thus more likely to suffer from shocks coming from different sources, and they tend to import more calories. The number of trading partners does not play any role in determining the number of times a country suffers a large demand deficit, nor does the total amount of calories that are imported. On the contrary, node out-strength (that is, total exports) reduces vulnerability as it provides countries with more room to pass on a shock to trade partners. A similar negative correlation is found for the concentration of imports (measured in terms of C4) and clustering. We interpret these findings as a signal that relying on a small number of source countries protects countries from shocks originating in other parts of the network and is consistent with results discussed in "Regression analysis". Because in our exercise shocks originate in turn from all possible countries, being exposed to only a few of them turns out to reduce the number of instances where the final demand deficit is large. Similarly, clustering is associated with tight links among trading partners indicating both the possibility to pass on the shock to other countries and a more widespread diffusion of disturbances, that are less likely to generate large disruptions. Finally, among the different measures of centrality we include in the analysis (betweenness, hub score and PageRank) only betweenness is positively correlated with the number of times a country experiences a large caloric deficit. In this case the results are more significant when using 500 kcals/person/day as a threshold, the only significant difference between the two parts of Table 2.
Ranking analysis. To further investigate the vulnerability of countries, we rank them based on the size of the final demand deficit they face in each simulation, with the smallest deficit taking value 1. We then sum across all the simulations and take logs to obtain a continuous measure of country vulnerability, which we regress on the same set of correlates used in the previous section.
Results in Table 3 are qualitatively similar to those obtained with the negative binomial regression, although the significance of the specific variables is much lower now. Out-strength confirms its role as an escape valve, while hub-score centrality is associated with more vulnerability.

Discussion
The paper examines the role of international trade in food as a vehicle for the diffusion of shocks originating in foreign countries and as a channel to diversify risks and share the burden of domestic shocks with other countries.
To do so, we portray international food trade as a directed network of calories and simulate the propagation of the shock by refining the model developed by Burkholz and Schweitzer 19 .
Our simulations indicate that, in a globalized food system, shocks can easily travel a long way across the trade network, so that they end up affecting countries which are far away from the original spreader. The results of the analysis suggest that low-income and food insecure countries tend to be more exposed to external food trade shocks. Indeed, on average, high income countries turn out to be better equipped to deflect shocks originating from abroad and therefore, when a shock hits the network, it is more likely that it will be absorbed by countries in Africa, in the Middle East or in Latin America. At the same time, even if the participation to international food trade always provide some level of insurance against shocks to domestic food supply, the degree of protection exhibits substantial regional variation. In fact, while most of the countries in Europe, North America and Oceania are able to take advantage of trade to divert the negative effect of domestic shocks, other countries face worse hedging opportunities. In theory, by establishing food reserves, every country could shield itself against negative food shocks. Individual countries, however, may not be able to stock enough food to withstand a worstcase scenario. Even though the constitution of international reserves would be a cost-effective solution to ensure all the participants to the food trade network against negative food shocks, it might not be feasible because of coordination problems, which are often exacerbated by food crises.
We also analyse and discuss in detail how node characteristics are associated with countries' vulnerability and average exposure. Among other results, we find that while higher-order network measures such as clustering tend to dampen the effect of trade shocks, the number of trading partners does not seem to play a relevant role in determining countries' vulnerability. In this respect, we note that the lack of a beneficial effects from trade diversification may be partly due to our analytical setting, which assigns the same probability to shocks originating from each country. Weighting the likelihood of the shocks using information on past reductions in domestic output or on the probability of adverse weather conditions 39 may thus represent an interesting extension to the model and an avenue for further research. Table 2. Vulnerability analysis: negative binominal regression. The table reports the results on the negative binomial regressions in which the dependent variable is the number of times a country suffers demand deficits higher than 250 and 500 kcals/person/day. Each simulation represents a shock associated to a 30% drop of domestic food production starting from a specific country and diffusing through the network with a given value of the parameter α . We have 172 countries and set α ∈ (0, 0.5, 1) for a total of 516 simulations. Dummies for α ∈ (0, 0.5, 1) not shown. Clustering and PageRank measures have been multiplied by 1,000. Robust standard errors in parentheses. Significance level: ***p < 0.01 , **p < 0.05 , * p < 0.1.

Methods
Data and network structure. The analysis is based on a set of simulations of the diffusion dynamics of food shocks through a weighted and directed network which is calibrated on the basis of actual international food trade data. More specifically, the network is built to resemble the structure of the international trade of food products, with each node representing a country and the edges representing the bilateral trade flows. The weight of the edge from the generic origin country i to the generic destination country j is given by the total amount of calories embedded in the food products exported from the former to the latter. The total number of nodes is 172 and no major country is excluded. Data on trade flows refer to 2013, the latest year for which the required information was available at the time of the analysis (September 2019). Given the stability of trade networks 40 , the specific year used for calibration of the diffusion model is not crucial for the results.
In formal terms, we run the simulations on a weighted directed graph N}} is a set of directed edges between pairs of nodes, and W = {W c i c j : i, j ∈ {1, . . . , N}} is the set of the weights associated with the edges (i.e., the kcals embedded in the export of food from country c i to country c j ).
In order to calculate the amount of calories embedded in food trade flows, we follow the approach of Traverso and Schiavo 10 and match product-level bilateral trade flows with entries from the United States Department of Agriculture's (USDA) Food Composition Databases. Absent country-specific conversion factors, this approach exploits the size of the US market and quality of the data to determine the caloric content of arount 380 food products 10 . Specifically, we retrieve product-level bilateral food trade data from the Food and Agriculture Organization's (FAO) trade matrices. Data on fisheries and seafood, not included in the original FAO dataset, are taken from the Centre d'Etudes Prospectives et d'Informations Internationales's (CEPII) BACI database 41 .
Socioeconomic attributes of the countries, such as total population and gross domestic product (GDP), come from the FAO statistic databases. In addition, we estimate domestic food production by adjusting FAO Food Balance Sheets' (FBS) data on domestic food supply for countries' net international position. More specifically, for each country we compute the net food trade balance (in kcals) and we add it to the aggregated kcals supply calculated using FAO data. Table 3. Vulnerability analysis: OLS regression of ranking. The table reports the results on the OLS regressions in which the dependent variable is countries' ranking in terms of vulnerability to external shocks (higher values in the ranking are associated with higher vulnerability). The ranking is based on the results of a set of 3N simulations that reproduce, one at the time and for all the countries in the network, the propagation of shock associated to a 30% drop of domestic food production and a value of α equal to 0, 0.5, and 1. Dummies for α ∈ (0, 0.5, 1) not shown. Clustering and PageRank measures have been multiplied by 1,000. Robust standard errors in parentheses. Significance level: *** p < 0.01 , ** p < 0.05 , * p < 0.1.  19 . To formally introduce the model, we first define the equilibrium domestic demand (i.e., before the shock) of the generic county c i as: in which prod c i , exp c i , and imp c i indicate domestic production, export and import respectively, expressed in kcals. Note that in network terms By using Eq. (1) we can compute the initial demand of each country at time t = 0. If a country c s is shocked at t = 1 by a shock c s , a demand deficit dd c s (t = 1) = shock c s will result. Country c s can compensate this shock by reducing its export (thus assuming that domestic demand is served first) and/or by increasing its import to compensate for lower domestic production. Formally: where α ∈ [0, 1] is a parameter used to distribute the shock between import and export flows. The value α = 0 means that the shock is entirely compensated by increasing imports, while a value of α = 1 means the shock is propagated by a reduction of exports. Other values of α indicate how shock is split between imports and exports. For example, a value of α = 0.2 means that the 20% of shocks is compensated by reducing exports while the reamining 80% is compensated trough an increase of imports.
Shock compensation by country c s induces a cascading effect on those countries that import/export from/ to c s . In fact, after the initial step, the shock propagates in the network producing a demand deficit in a generic country c i at time step t given by: To face this demand deficit country c i tries to reduce its export to: It is easy to see that if imports and exports do not change, the demand deficit equals zero dd c i (t) = 0. Variations on exports and/or imports are, in network terms, implemented by changing the weights associated with the edges connecting countries, as detailed in Eqs. (2) and (3).
We assume two different dynamics for adjustment via import and export. More specifically, any increase in imports is distributed across partners in proportion to the kcals supplied to country c i in the baseline scenario ( t = 0 ). On the other hand, reduction in export flows are transmitted in a way that is inversely proportional to the GDP of out-neighbors. Formally, if dd c i (t) > 0 , the reduction in exports will be distributed among the countries that import from c i as: where: In Eq. (9) c h ranges over those neighbors of c i for which W c i ,c h (t) > 0 , GDP c h is the GDP of the generic out-neighbor c h , and k out c i (t) is the out-degree of country c i at step t (i.e., the number of positive outward edges departing from c i ). F c i c j (t) expresses the fraction of demand deficit of country c i absorbed by country c j , and it is inversely proportional to the GDP of c j compared to the GDP of the other out-neighbours of c i (i.e. countries importing from c i ). Importantly, assuming that the reduction in exports will be inversely proportional to economic size of the trade partners (measured in terms of GDP) represents a major departure from the existing literature 19 , that models export reductions which are proportional to the pre-shock export shares. Countries, in fact, face different budget constraints 18 and poor countries are likely to be disproportionately affected by global shortages 42 . Therefore, even though the model works with quantities, it mimics some some of the dynamics that would be observed in models that incorporate prices. Equations (8) and (9) ensures that as soon as trade between two countries c i , c j falls to zero, the importer will no longer absorb any remaining shock emanating from c i .
The diffusion process stops when no country facing a positive demand deficit can further reduce its exports. While we do not make specific assumptions regarding the length of each step of the diffusion mechanism, we www.nature.com/scientificreports/ assume that the whole propagation process stops in a relatively short period of time, that is between a few months and a year, as done in the existing literature 19 .
Network topology. Here we provide a topological analysis of the directed network used in our experiments to simulate the shock propagation. The network includes data from 172 countries (nodes), and 10.5 K food export (weighted links, in Million kcals/year). Each country exports food to, on average, ∼ 61 countries, i.e., 35.6% of all countries, for an average of ∼ 123B kcals/year. 61% of the links are reciprocal (i.e., given a link e ij between the countries i and j, the link e ji also exists in the network). There are 47 Strongly Connected Components (SCCs, i.e., sub-networks such that there is a path between each pair of vertices) and the largest includes 126 countries. On the other hand, there is only one giant Weakly Connected Component (WCC, i.e., sub-network such that there is a path between each pair of vertices, ignoring the directionality of links) that includes all countries. While the directed diameter of the network cannot be computed since the network is not strongly connected, the undirected diameter is two. That is, any two countries are up to two hops from each other if the direction of the exchange is not considered. The average (unweighted) Local Clustering Coefficient (LCC, defined as the fraction of possible triangles that exist through a given node) is 0.81, while the Transitivity (defined as the fraction of all possible triangles) is 0.674. We also analyze the assortativity of node degree and strength. Specifically, we compute the node-level Pearson's correlation coefficient between the degree and the Average Nearest Neighbor Degree (ANND) 43 , and also the one between the strength and the Average Nearest Neighbor Strength (ANNS) 44 .
where α, β ∈ [in, out] , i.e., we consider the different in-out link directions, and N α i is the α neighborhood of i. Moreover, we also report the aggregated ANNS quantity where α = β = tot and the in and out neighbors are aggregated. For the ANND case, instead of the strength s β j we consider the degree d β j . The correlation coefficient show a strong aggregated disassortativity, meaning that nodes that import and/ or export to a large number of countries (that is, have a high total degree) are neighbors to countries that have just a few links, and viceversa. A similar consideration can be made for the correlation between the degree and the in/in and in/out ANNDs, while the out/in and out/out are weaker but positive. On the other hand, all the strength assortativity coefficients are negative, meaning that countries that export and/or import great quantities of kcals are, on average, linked to ones with lower exports and/or imports.
A summary of the topology measures is reported in Table 4.
Estimation methods. We use alternative regression strategies to address different questions. To start, we employ a Tobit regression to investigate the network measures that correlate more strongly with the demand deficit associated with each country in the various simulation exercises. In this case, each observation is identified by a country pair, the one hit by the initial shock and the one for which we measure the final demand deficit, plus a value of the parameter α , which determines whether propagation occurs only via exports, or also through imports.
The dependent variable, expressed in terms of kilocalories per person per day, is the estimated reduction of per capita domestic food supply in country j purplethat results from simulating a 30% fall of aggregate food production in country i using a specific value of α. The list of explanatory variables includes shock size (in kcals per capita/day relative to country j population), per capita GDP of country j, the concentration of imports of food items in country j (captured by the share of its top 4 supplier countries in its total imports, indicator variables ( D ij ) for whether the shock is domestic, originates in a country that is directly linked to country j, or in a country located ad infinite (network) distance from j. Moreover, we add a number of network measures for both the origin ( N i ) and destination ( N j ) country, namely in-and out-strength, in-and out-degree, hub score, page-rank, betweenness and clustering. Finally, we control for the value of the parameter α.
Tobit regression is chosen because it accommodates the large number of zeros observed in the dependent variable, while assuming that zeros and positive values follow the same data generating process, that is, the same factors explain the zeros and the positive outcome.
The second step of the analysis focuses on a count variable: how many time does a country face a demand deficit higher than 250 or 500 kcals per capita/day, which amount to 1/8 or 1/4 of the recommended daily intake for an adult. OLS regression would be inappropriate in this case and we therefore opt for negative binomial regression, which is preferred over Poisson as it is more robust.
In this case the estimating equation reads as follows: Last, our analysis of the determinants of country vulnerability to shocks ranks each country in terms of the demand deficit they face for each simulation, and then uses the sum across all simulations as the dependent variable, with larger numbers associated with larger vulnerability. (12) Large dd j (α) = β 1 GDP j + β 2 INdeg j + β 3 OUTdeg j + β 4 INstr j + β 5 OUTstr j + β 6 C4 j + β 7 clust j + β 8 betw j + β 9 Hub j + β 10 pgRank j + η α + ǫ j . www.nature.com/scientificreports/ In this case, the dependent variable can be treated as a continuous measure, so that standard OLS regression can be adopted. Apart from the change in the dependent variable, the specification is the same as in Eq. (12).
Additional results. Shock size relative to destination countries' population. Predictably, larger global shocks tend to be associated with larger demand deficits. More precisely, a one percent increase in the magnitude of the shock (in per capita terms of the destination countries' population) is linked to a daily demand deficit increase of about 60 kcals per capita.
Distance from origin of the shock. When the shock is domestic, a country will-everything else equal-bear a larger fraction of it and thus experience a larger caloric deficit.
On the other hand, when the shock originates abroad, the network distance we observe in our data ranges between 1 and 3, plus a number of country-pairs at infinite distance as there are no directed path going from one to the other. We have modeled distance by means of two indicator variables, one denoting an indirect connection between the origin of the shock and the one experiencing a demand deficit (that is, distance(ORIG, DEST) ≥ 2 ), and the second taking value 1 if the distance is infinite. The baseline case is therefore when the country that receives the shock imports food from the country of where the shock originates. Network distance is negatively correlated with the magnitude of the demand deficit. In particular, not importing directly from the country originally hit by the shock is associated with an average reduction in the per capita caloric deficit of 25-27 kcals per day, while the distance from origin is infinite the deficit is substantially less severe (around − 130 kcals/ person/day).
The relatively small effect of an indirect shock (coupled with a significance that does not reach the 5% level) indicates that in a highly connected food system shocks will not only affect direct partners, but reverberate globally.
Degree centrality. The magnitude of the final demand deficit correlates negatively with the out-degree of a country, which thus has more means to pass the shock on to other countries, while the positive correlation with the number of inward links is not significant. In quantitative terms, an additional export connection is associated (other things being equal) to a fall in the demand deficit of about 11-12 kcals/person/day. A larger number of export partners for the country where the shock originates increases the magnitude of the final demand deficit, as a larger number of outward links spread the shock in multiple directions, while more www.nature.com/scientificreports/ www.nature.com/scientificreports/ inward links have a negative effect. In these cases, however, the size of the estimated coefficients is much smaller than in the case of destination countries.
Node strength. The number of import partners is a noisy measure of exposure to external shocks, because not all trade flows are equally important. When looking at the total magnitude of kcals that are either imported or exported by countries we observe that a larger amount of imports is associated with a larger demand deficit, and the same holds when a shock originates from a country that exports a lot. On the other hand, this feature does not play a significant role in shielding countries from the negative effects of a shock, although the estimated coefficient for the out-strength of destination countries takes a negative sign.
Import concentration. The concentration of imports, defined as the share of imports coming from the four most important trading partners (C4), has a negative effect on the demand deficit. This suggests that the relying on a small number of key suppliers shields countries from external shocks and that the usual diversification argument (whereby agents are better off when they source from multiple partners in order to edge against risk) seems not to apply here.
Local clustering coefficient. Countries featuring a high level of clustering experience, on average, lower demand deficits. On the other hand, the shock is not significantly correlated with the local clustering coefficient of the country of origin. One way to rationalize this result is the fact that when a shock reaches a cluster, there are multiple channels that allow countries to dissipate it; moreover, it is less likely to disproportionately affect a single partner since withing the group of countries there will be strong interconnections.
Centrality. We experiment with different measures of network centrality, namely betweenness, hub score, and PageRank. We do not have a strong prior on the effect of centrality: while shocks originating in more central countries will probably affect a larger number of countries, the very fact that they travel further implies there is more room for it to dissipate and have a smaller effect on single countries. On the other hand, more central countries are more likely to be hit by external shocks, but should also have the ability to pass them on to more partners.
When it comes to countries receiving an external shock, we find no significant correlation between any of the centrality measures and the size of the final demand deficit. On the contrary, the position of origin countries in the network does play a role. The hub score and, to a lesser extent, PageRank centrality are negatively correlated with the caloric deficit, whereas the correlation is positive when we look at betweenness centrality. Hubs, which export to several countries, thus appear to distribute the shock across multiple partners and this reduces the toll imposed on each one of them. On the other hand, high betweenness may signal the ability of a country to connect different parts of the network, but not necessarily through many links; as a result, when a shock originates in central country it may travel to distant countries yet generate, everything else equal, important consequences on trade partners (Fig. 5).